package com.mjh.zhujianju.controller.base;

import com.livew.framework.base.controller.BaseController;
import com.livew.framework.base.service.BaseService;
import com.livew.framework.page.PagedResult;
import com.livew.framework.pojo.AjaxResult;
import com.mjh.zhujianju.model.base.CommentEO;
import com.mjh.zhujianju.service.base.CommentService;
import com.mjh.zhujianju.vo.base.CommentVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("comment")
public class CommentController extends BaseController<CommentEO> {

    @Autowired
    private CommentService commentService;

    @RequestMapping(value = "getPage", method = RequestMethod.POST)
    @ResponseBody
    public AjaxResult getPage(CommentVO commentVO) {
        PagedResult<CommentVO> list = commentService.getPageList(commentVO);
        return AjaxResult.getResult(list);
    }


    @Override
    protected BaseService<CommentEO> getService() {
        return commentService;
    }
}
